package org.leon.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


/**
 * Created by Administrator on 2017/4/17.
 */
@Controller
public class HelloAnnotationController {
    private static final Log logger = LogFactory.getLog(HelloController.class);

    @RequestMapping(value = "/hello/annotation")
    public ModelAndView hello() throws Exception {

        logger.info("被调用");

        ModelAndView mv = new ModelAndView();

        mv.addObject("message", "Hello Baby!");

        mv.setViewName("/WEB-INF/content/welcome.jsp");

        return mv;
    }

}
